﻿<UserControl x:Class="CmdletHelpEditor.UI.UserControls.AdvancedCmdletUC"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:viewModel="clr-namespace:CmdletHelpEditor.API.ViewModel"
             mc:Ignorable="d"
             d:DesignHeight="500" d:DesignWidth="500"
			 d:DataContext="{d:DesignInstance viewModel:MainWindowVM}">
	<StackPanel IsEnabled="{Binding SelectedModule.UseOnlineProvider}">
		<GroupBox Header="Online publishing information">
			<StackPanel>
				<CheckBox Content="Allow to publish this cmdlet online" IsChecked="{Binding EditorContext.CurrentCmdlet.Publish}"/>
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition/>
						<RowDefinition/>
						<RowDefinition/>
						<RowDefinition Height="5"/>
						<RowDefinition/>
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="Auto"/>
						<ColumnDefinition Width="400"/>
					</Grid.ColumnDefinitions>
					<TextBlock Text="Article Title: " Grid.Row="0" Grid.Column="0"/>
					<TextBlock Text="Article ID: " Grid.Row="1" Grid.Column="0"/>
					<TextBlock Text="Article URL: " VerticalAlignment="Center" Grid.Row="2" Grid.Column="0"/>
					<TextBox Text="{Binding EditorContext.CurrentCmdlet.Name}" Grid.Row="0" Grid.Column="1" IsReadOnly="True"/>
					<TextBox Text="{Binding EditorContext.CurrentCmdlet.ArticleIDString}" Grid.Row="1" Grid.Column="1" IsReadOnly="True"/>
					<TextBox Text="{Binding EditorContext.CurrentCmdlet.URL}" MinLines="2" MaxLines="2" Grid.Row="2" Grid.Column="1" IsReadOnly="True"/>
					<Button Content="Publish this cmdlet"
							IsEnabled="{Binding EditorContext.CurrentCmdlet.Publish}"
							Command="{x:Static viewModel:MetaWeblogCommands.PublishArticleCommand}"
							CommandParameter="{Binding EditorContext.CurrentCmdlet}"
							Grid.Row="4"
							Grid.Column="0"
							Padding="5,5,5,5"/>
				</Grid>
			</StackPanel>
		</GroupBox>
        <Grid>
			<Grid.RowDefinitions>
				<RowDefinition/>
				<RowDefinition/>
				<RowDefinition/>
				<RowDefinition/>
			</Grid.RowDefinitions>
			<TextBlock Grid.Row="0" Text="Extra header HTML code:"/>
			<TextBlock Grid.Row="2" Text="Extra footer HTML code:"/>
			<TextBox Grid.Row="1" MinLines="12" MaxLines="12" VerticalScrollBarVisibility="Auto" Text="{Binding EditorContext.CurrentCmdlet.ExtraHeader}"/>
			<TextBox Grid.Row="3" MinLines="12" MaxLines="12" VerticalScrollBarVisibility="Auto" Text="{Binding EditorContext.CurrentCmdlet.ExtraFooter}"/>
		</Grid>
    </StackPanel>
</UserControl>
